#ifndef __ARTICLE_h__
#define __ARTICLE_h__

#include <wx/wx.h>
#include <vector>
#include <wx/file.h>
#include <wx/textfile.h>
#include "standalones.h"


class Article
{
    public:
        Article(wxString link, wxString title, wxString description=wxT(" "), wxString creator=wxT(" "), wxString mode=wxT("enabled"))
            {this->link=link; this->title=title; this->description=description; this->creator=creator; this->mode=mode;}
        virtual ~Article() {}

        wxString link;
        wxString title;
        wxString description;
        wxString creator;
        wxString mode;
};

class ArticleList
{
    public:
        ArticleList() {}
        virtual ~ArticleList() {}

        std::vector<Article> list;

        int Find(wxString link);

        int  Remove(wxString link);
        void RemoveItem(int item);
        void Clear();
        void Append(wxString link, wxString title, wxString description=wxT(" "), wxString creator=wxT(" "), wxString mode=wxT("enabled"));
        int Enable(wxString link);
        int Disable(wxString link);
        int GetCount();
        wxString GetLink(wxString title);
        void TrimOldArticles(int target_size);

        void Save(wxString path);
        void Load(wxString path);
};

#endif
